//package com.plian.system.controller.bpa;
//
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
//import com.plian.Tools.base.BaseController;
//import com.plian.system.dto.pf.BusinessReplenishDTO;
//import com.plian.system.dto.pf.OperatingPerformanceReportDTO;
//import com.plian.system.dto.pf.PerformanceReportDTO;
//import com.plian.system.entity.bpa.BusinessAssessment;
//import com.plian.system.entity.bpa.BusinessAssessmentGear;
//import com.plian.system.entity.bpa.BusinessAssessmentScore;
//import com.plian.system.entity.pf.AppraisalIndex;
//import com.plian.system.entity.pf.BusinessAudit;
//import com.plian.system.mapper.bpa.BpaFinancialPerformanceGearMapper;
//import com.plian.system.mapper.bpa.BpaFinancialPerformanceMapper;
//import com.plian.system.mapper.bpa.BpaIndustryCreditConfigMapper;
//import com.plian.system.mapper.bpa.BpaIndustryStandardConfigMapper;
//import com.plian.system.mapper.pf.AppraisalIndexMapper;
//import com.plian.system.mapper.pf.BusinessIndicatorsMapper;
//import com.plian.system.model.R;
//import com.plian.system.model.token.PassToken;
//import com.plian.system.service.bpa.*;
//import com.plian.system.service.im.IBaseInvestmentPlanService;
//import com.plian.system.vo.report.ReportReturnVO;
//import com.plian.system.wrapper.bpa.*;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiResponse;
//import io.swagger.annotations.ApiResponses;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//import java.math.BigDecimal;
//import java.util.List;
//
///**
// * 经营业绩考评情况
// * BusinessReplenishController
// */
//@RestController
//@AllArgsConstructor
//@RequestMapping("api/jyjxkpreport")
//@Api(value = "经营业绩考评汇总", tags = "经营业绩考评汇总")
//public class OperatingPerformanceController extends BaseController {
//
//    @Resource
//    private IOperatingPerformanceService businessReportService;
//
//    @Resource
//    private AppraisalIndexMapper appraisalIndexMapper;
//    @Resource
//    private BusinessIndicatorsMapper businessIndicatorsMapper;
//    @Resource
//    private BpaFinancialPerformanceMapper bpaFinancialPerformanceMapper;
//    @Resource
//    private BpaFinancialPerformanceGearMapper performanceGearMapper;
//    @Resource
//    private BpaIndustryCreditConfigMapper industryCreditConfigMapper;
//    @Resource
//    private BpaIndustryStandardConfigMapper standardConfigMapper;
//
//    private final BusinessAssessmentGearWrapper businessAssessmentGearWrapper;
//
//    private final BusinessAssessmentScoreWrapper businessAssessmentScoreWrapper;
//
//    private final BusinessAssessmentScoreDynamicWrapper businessAssessmentScoreDynamicWrapper;
//
//    private final IBusinessAssessmentScoreService businessAssessmentScoreService;
//
//    private final IBusinessAssessmentScoreDynamicService businessAssessmentScoreDynamicService;
//
//    private final IBusinessAssessmentGearService businessAssessmentGearService;
//
//    private final IBusinessAssessmentService businessAssessmentService;
//
//    private final IBusinessAssessmentGearDynamicService businessAssessmentGearDynamicService;
//
//    private final BusinessAssessmentGearDynamicWrapper businessAssessmentGearDynamicWrapper;
//
//    private final BusinessAssessmentWrapper businessAssessmentWrapper;
//
//    private final IBaseInvestmentPlanService baseInvestmentPlanService;
//
//
//    @ApiOperation(value = "经营业绩考评得分", notes = "经营业绩考评得分")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 1999, message = "服务器错误"),
//    })
//    @PassToken
//    @PostMapping("/summary")
//    public R<ReportReturnVO> summary(@RequestBody BusinessReplenishDTO businessReplenishDTO) {
//        return businessReportService.summary(businessReplenishDTO);
//    }
//
//    @PassToken
//    @PostMapping("/newMakeSureScores")
//    public R newMakeSureScores(@RequestBody PerformanceReportDTO dto) {
//
//        //财务绩效
//        BusinessAudit businessAudit = new BusinessAudit();
//
//        //配置主表
//        List<BusinessAssessment> businessAssessmentList = businessAssessmentService.list(Wrappers.<BusinessAssessment>lambdaQuery()
//                .eq(BusinessAssessment::getIsYear, dto.getYear()));
//        //档位主表
//        List<BusinessAssessmentGear> gearList = businessAssessmentGearService.list();
//        //计分主表
//        List<BusinessAssessmentScore> scoreList = businessAssessmentScoreService.list();
//        //行业类型
//        String industryCode = "139009";
//        //标准类型
//        String standardCode = "138002";
//        //指标
//        AppraisalIndex appraisalIndex = appraisalIndexMapper.selectOne(Wrappers.<AppraisalIndex>lambdaQuery()
//                .eq(AppraisalIndex::getName, "净资产收益率"));
//        //值
//        OperatingPerformanceReportDTO performanceReportDTO = new OperatingPerformanceReportDTO();
//        performanceReportDTO.setIndicatorsCategoryId(appraisalIndex.getId());
//        performanceReportDTO.setIndicatorsCategoryName(appraisalIndex.getName());
//        performanceReportDTO.setIndicatorsWeight(new BigDecimal(10));
//        //基准值
//        performanceReportDTO.setBaseline(new BigDecimal(-19.85));
//        //激励目标值
//        performanceReportDTO.setTarget(new BigDecimal(-13.25));
//        //基本目标值
//        performanceReportDTO.setBasicTarget(new BigDecimal(-18.20));
//        //完成值
//        BigDecimal completeValue = new BigDecimal("-24.72");
//
//        BigDecimal enterpriseItem = BigDecimal.ZERO;
////        BigDecimal enterpriseItem = businessReportService.newMakeSureScores(dto, businessAudit, completeValue, gearList,
////                scoreList, businessAssessmentList, industryCode, standardCode, appraisalIndex, performanceReportDTO);
//
//        return R.data(enterpriseItem);
//    }
//
//}
